package com.fjnldx.mes.domain.enums;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public enum DevSnAreaEnum {
    PROCEDURE_BH1("细纱", new ArrayList<>(Collections.singletonList("xiSha_devSn"))),
    PROCEDURE_BH2("粗纱", new ArrayList<>(Arrays.asList("devSn_cs", "devSn_cs_new"))),
    PROCEDURE_BH3("并条", new ArrayList<>(Collections.singletonList("devSn_bt"))),
    PROCEDURE_BH4("梳棉", new ArrayList<>(Arrays.asList("devSn_sm", "devSn_sma"))),
    PROCEDURE_BH5("抓棉机", new ArrayList<>(Collections.singletonList("devSn_zmj"))),
    PROCEDURE_BH6("开棉机", new ArrayList<>(Collections.singletonList("devSn_kmj"))),
    PROCEDURE_BH7("多仓", new ArrayList<>(Collections.singletonList("devSn_dc"))),
    PROCEDURE_BH8("络筒", new ArrayList<>(Collections.singletonList("devSn_lt"))),
    ;
    private String gongxu;
    private List<String> dicBhs;

    DevSnAreaEnum(String gongxu, List<String> dicBhs) {
        this.gongxu = gongxu;
        this.dicBhs = dicBhs;
    }

    public static List<String> getDevSnAreaEnumDicBhs(String gongxu) {
        for (DevSnAreaEnum c : DevSnAreaEnum.values()) {
            if (gongxu.equals(c.getGongxu())) {
                return c.dicBhs;
            }
        }
        return null;
    }

    public String getGongxu() {
        return gongxu;
    }

    public void setGongxu(String gongxu) {
        this.gongxu = gongxu;
    }

    public List<String> getDicBhs() {
        return dicBhs;
    }

    public void setDicBhs(List<String> dicBhs) {
        this.dicBhs = dicBhs;
    }
}
